package top.humbleyuan.linkedlist;

import top.humbleyuan.datastructure.linkedlist.LinkNode;
import top.humbleyuan.datastructure.linkedlist.MyLinkedList;

/**
 * @Author HumbleYuan
 * @Date 2020/5/18 22:46
 * @Des
 */
public class LeetCode_707 {
    public static void main(String[] args) {
        /**
         * 数据准备
         */
        LinkNode head = new LinkNode(6);
        int[] vals = {2,3,5,7};
        head = LinkNode.formLink(head,vals);


        MyLinkedList myLinkedList = new MyLinkedList();
        //myLinkedList.first = head;
        //LinkNode.headToString(head);

        //查找
        //System.out.println(myLinkedList.get(3));

        myLinkedList.addAtHead(1);
        myLinkedList.addAtIndex(1,2);
        System.out.println(myLinkedList.get(1));
        LinkNode.headToString(myLinkedList.first);
    }
}
